<?php
/**
 * Created by PhpStorm.
 * User: wangsong
 * Time: 2018/5/28 10:02
 */

namespace App\Project\Scene;


/**
 * 以后开发的针对不同医院的判断是否有那些模块的功能，可以在这里实现
 *
 * Class MedicalScene
 * @package App\Project\Scene
 */
class MedicalScene
{
    /**
     * @var \App\User
     */
    protected $user;

    /**
     * @var \App\Models\Hospital
     */
    protected $hospital;

    public function isWestern()
    {
        if(\Auth::user()->hospital_id){
            return \Auth::user()->hospital->isWestern();
        }
        return false;
    }

    public function isCn()
    {
        return \Auth::user()->hospital->isCn();
    }

    public function isWesternAndCn()
    {
        return \Auth::user()->hospital->isWesternAndCn();
    }

    /**
     * @return \App\User
     */
    public function getUser()
    {
        return \Auth::user();
    }

    /**
     * @return \App\Models\Hospital
     */
    public function getHospital()
    {
        return \Auth::user()->hospital;
    }
}